Skip to content

chore(ci): Renovate を導入し依存更新を自動化#336

Merged
yusuke0610 merged 3 commits into
mainfrom
feat/renovate-dependency-automation
Jun 19, 2026
Merged

chore(ci): Renovate を導入し依存更新を自動化#336
yusuke0610 merged 3 commits into
mainfrom
feat/renovate-dependency-automation

Conversation

@yusuke0610

@yusuke0610 yusuke0610 commented Jun 19, 2026

Copy link
Copy Markdown
Owner

概要

依存更新を自動追従する仕組みが無かった(Dependabot / Renovate 未導入)課題に対し、Renovate(Mend hosted app) を導入する。固定運用は維持したまま、更新の PR 起票のみ自動化 する。

採用判断の詳細は docs/adr/0014-renovate-dependency-automation.md を参照。

対象エコシステム(6 manager)

manager 対象 固定方式の維持
github-actions .github/workflows/*.yml pinDigests(SHA + # v4 コメント継続)
pip_requirements backend/requirements.txt rangeStrategy: pin== 維持)
npm web/package.json + lock range + lockfile 更新(devDeps minor/patch はグルーピング)
terraform infra/.../versions.tf + 各 env lock ~> + lock 更新
docker / docker-compose backend/Dockerfile, docker-compose.yml docker:pinDigests(digest 固定)
nix flake.nix + flake.lock locked input 追従

方針

  • 自動マージなし — 全 PR を人間レビュー(慎重なサプライチェーン方針に合わせる)
  • :dependencyDashboard で全更新を Issue 一覧管理
  • vulnerabilityAlerts を優先起票し pip-audit の後追いを先回りで補強
  • lockFileMaintenance 有効(package-lock / flake.lock / .terraform.lock.hcl をリフレッシュ)
  • 起票ノイズ抑制: 毎週月曜朝の schedule + prConcurrentLimit / prHourlyLimit

検証

  • Renovate 公式 validator で設定の妥当性を確認済み(Config validated successfully
  • アプリコード・codegen 正本に変更なしのため make ci は非該当

マージ後の手動ステップ ⚠️

実際に稼働させるには、GitHub で Mend Renovate App をこのリポジトリにインストールする必要がある(GitHub App の権限付与はブラウザ操作)。設定ファイルが既にあるため onboarding PR はスキップされ、Dependency Dashboard Issue が立つ。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Configured automated dependency update proposals to streamline library and dependency management
  • Documentation
    • Added architectural decision record documenting the dependency automation strategy, including update grouping and security alert prioritization

actions/pip/npm/terraform/docker/nix の 6 エコシステムを対象に
Renovate(Mend hosted app)の設定を追加。固定運用(SHA pin / ==
固定 / digest pin)は維持し、更新提案の PR 起票のみ自動化する。
自動マージは行わず全 PR を人間レビューとする。採用判断は ADR-0014
に記録。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Replaces the minimal renovate.json (which only extended config:recommended) with a full .github/renovate.json5 covering schedules, PR rate limits, lockfile maintenance, vulnerability alert rules, and per-ecosystem packageRules for GitHub Actions, pip, Terraform, Docker Compose, Nix, and npm. An ADR is added documenting the decision to automate dependency proposals only, without automerge.

Changes

Renovate Dependency Automation

Layer / File(s) Summary
Renovate config and ADR
.github/renovate.json5, docs/adr/0014-renovate-dependency-automation.md, renovate.json
Removes the minimal renovate.json and replaces it with .github/renovate.json5 defining timezone, weekly schedule, labels, no automerge, PR concurrency/rate limits, weekly lockfile maintenance, immediate vulnerability alert PRs, and packageRules for GitHub Actions digest pinning, pip pin strategy, Terraform provider grouping, Docker Compose digest pin for libsql-server, Nix flake lock tracking, and npm devDependency minor/patch grouping. The ADR records the policy choice: update proposals only, fixed pinning maintenance, vulnerability-first prioritization, Dependency Dashboard aggregation, and no automerge.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

  • Dependency Dashboard #339: The enableDashboard-equivalent aggregation settings in the new .github/renovate.json5 directly produce the Dependency Dashboard output described in this issue.

Poem

🐇 A rabbit once juggled dependencies all day,
With digests and pins keeping chaos at bay.
Now Renovate hops in with schedules so neat,
No automerge mischief — just PRs, how sweet!
The dashboard awaits, every update in view,
One weekly hop forward, the lockfiles stay true. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(ci): Renovate を導入し依存更新を自動化' directly describes the main change: introducing Renovate for automated dependency updates, which is the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/renovate-dependency-automation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

yusuke0610 and others added 2 commits June 20, 2026 08:43
onboarding で main に追加されたデフォルト renovate.json を削除し、
6 エコシステム対応の .github/renovate.json5 に一本化する。設定ファイル
重複(Renovate の multiple config エラー)を防ぐ。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/adr/0014-renovate-dependency-automation.md (1)

9-13: ⚖️ Poor tradeoff

Reduce duplication of pinning strategy descriptions.

The pinning strategies (GitHub Actions digest, Python ==, Terraform ~>, Nix flake.lock) are described in both the Context section (lines 9–13) and the Decision section (lines 31–35). This violates DRY principles. Consolidate by removing the repetition from one section or extracting to a shared reference point.

Since the guideline .claude/rules/common/duplication.md (referenced on line 68) is not provided in the review context, I cannot definitively verify if this violates the Rule of Three or extraction hierarchy. Please confirm whether this duplication is acceptable per your project's duplication policy.

💡 Example refactor: Move details to Decision, leave summary in Context

Context (lines 9–13): Remove detailed list, keep high-level statement.

-DevForge は依存をすべて「固定」運用している。GitHub Actions は SHA(digest) ピン留め
-(`uses: actions/checkout@34e1148... # v4`)、Python は `backend/requirements.txt` で
-`==` 完全固定、infra プロバイダは `~>` 制約 + `.terraform.lock.hcl`、Nix は `flake.lock`
-で固定している。これはサプライチェーン攻撃...
+DevForge は依存をすべて「固定」運用している(詳細は決定内容を参照)。
+これはサプライチェーン攻撃...

Decision (lines 31–35): Keep detailed breakdown here.

Also applies to: 31-35

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/adr/0014-renovate-dependency-automation.md` around lines 9 - 13, The
pinning strategies for GitHub Actions, Python, Terraform, and Nix are described
in duplicate within the Context section (lines 9-13) and the Decision section
(lines 31-35) of this ADR document. Consolidate this duplication by keeping the
detailed pinning strategy breakdown in the Decision section and replacing the
detailed list in the Context section with a high-level summary statement that
acknowledges DevForge uses fixed dependency versions without repeating the
specific strategy details for each tool.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/renovate.json5:
- Line 2: The comment on line 2 of the renovate.json5 file contains an incorrect
reference path. Update the comment that currently references docs/development.md
to instead point to the correct Architecture Decision Record location at
docs/adr/0014-renovate-dependency-automation.md. Replace the path portion of the
comment while keeping the rest of the descriptive text intact.

---

Nitpick comments:
In `@docs/adr/0014-renovate-dependency-automation.md`:
- Around line 9-13: The pinning strategies for GitHub Actions, Python,
Terraform, and Nix are described in duplicate within the Context section (lines
9-13) and the Decision section (lines 31-35) of this ADR document. Consolidate
this duplication by keeping the detailed pinning strategy breakdown in the
Decision section and replacing the detailed list in the Context section with a
high-level summary statement that acknowledges DevForge uses fixed dependency
versions without repeating the specific strategy details for each tool.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 01bf1d24-bff9-4420-afa1-4071cc96a1cc

📥 Commits

Reviewing files that changed from the base of the PR and between 4022891 and db21577.

📒 Files selected for processing (3)
  • .github/renovate.json5
  • docs/adr/0014-renovate-dependency-automation.md
  • renovate.json
💤 Files with no reviewable changes (1)
  • renovate.json

Comment thread .github/renovate.json5
@@ -0,0 +1,82 @@
{
// Renovate 設定の正本。詳細: ADR-0014 / docs/development.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Correct the reference path in the comment.

Line 2 references docs/development.md, but the actual Architecture Decision Record is located at docs/adr/0014-renovate-dependency-automation.md. Update the comment to point to the correct path.

💡 Proposed fix
-  // Renovate 設定の正本。詳細: ADR-0014 / docs/development.md
+  // Renovate 設定の正本。詳細: ADR-0014 / docs/adr/0014-renovate-dependency-automation.md
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Renovate 設定の正本。詳細: ADR-0014 / docs/development.md
// Renovate 設定の正本。詳細: ADR-0014 / docs/adr/0014-renovate-dependency-automation.md
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/renovate.json5 at line 2, The comment on line 2 of the
renovate.json5 file contains an incorrect reference path. Update the comment
that currently references docs/development.md to instead point to the correct
Architecture Decision Record location at
docs/adr/0014-renovate-dependency-automation.md. Replace the path portion of the
comment while keeping the rest of the descriptive text intact.

@yusuke0610
yusuke0610 merged commit 0fa51e3 into main Jun 19, 2026
18 checks passed
@yusuke0610
yusuke0610 deleted the feat/renovate-dependency-automation branch June 20, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant